package com.fled.itsmbigscreen.enums;


public enum AlarmStatusEnums {

    TEM(0, "温度警告"),
    HUM(1, "湿度警告"),
    SMOKE(2, "烟感报警"),
    WATER(3, "浸水报警"),
    ;

    private Integer ecode;

    private String emsg;


    AlarmStatusEnums(Integer ecode, String emsg) {
        this.ecode = ecode;
        this.emsg = emsg;
    }


    public Integer getEcode() {
        return ecode;
    }

    public String getEmsg() {
        return emsg;
    }


    public static AlarmStatusEnums statOf(Integer ecode) {
        for (AlarmStatusEnums state : values())
            if (state.getEcode().equals(ecode))
                return state;
        return null;
    }

}
